package com.jic.market.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.market.entity.PromotionMemberGrade;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 促销会员等级关系表
 * @author :
 * @email :
 * @since : 2020-06-30 04:30:32
 * @version : v1.0.0
 */
@Mapper
public interface  PromotionMemberGradeMapper {

    long insert(PromotionMemberGrade promotionMemberGrade);

    long delete(Long id);

    long update(PromotionMemberGrade promotionMemberGrade);

    PromotionMemberGrade queryByPrimaryKey(Long id);

    List<PromotionMemberGrade> query(PromotionMemberGrade promotionMemberGrade);

    List<PromotionMemberGrade> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("promotionMemberGrade") PromotionMemberGrade promotionMemberGrade);

    long queryPageCount(PromotionMemberGrade promotionMemberGrade);

    @Select("delete from promotion_member_grade where promotion_code = #{promotionCode}")
    void deleteByPromotionCode(@Param("promotionCode")String promotionCode);

    int insertBatch(@Param("items") List<PromotionMemberGrade> items);
}
